ruby:
  form_url = new_or_create_route? ? app_schemes_path : app_scheme_path(@scheme.app, @scheme)
  checked_channel = @channels ? @channels : 0

.col-md-12
  .card
    .card-header
      h3.card-title
        = @title
      .card-tools
        a href="#{app_path(@app)}"
          i.icon.far.fa-list-alt
          = t('links.back_to_list')
    .card-body
      = simple_form_for(@scheme, url: form_url) do |f|
        = f.error_notification
        = f.input :name, required: true
        = f.input :new_build_callout, value: true

        - if new_or_create_route?
          = f.simple_fields_for :channel_attributes do |n|
            = n.input :name, as: :check_boxes, collection: preset_channels, checked: checked_channel
        = f.button :submit
